package demo04;

public class FruitTest {
    public static void main(String[] args) {
        Fruit apple = new Apple();
        apple.setName("苹果");
        apple.setPrice(5);
        apple.setArea("云南...");
        System.out.println(apple.toString());

        Fruit kiwi = new kiwi();
        kiwi.setName("冻梨");
        kiwi.setPrice(15);
        kiwi.setArea("黑龙江....");
        System.out.println(kiwi.toString());

        Fruit watermelon = new Watermelon();
        watermelon.setName("西瓜");
        watermelon.setPrice(10);
        watermelon.setArea("中国");
        System.out.println(watermelon.toString());
    }
}
